From: Dmitry Gutov Date: Sat, 7 Feb 2015 01:18:24 +0000 (+0300) Subject: Make vc-test-svn03-working-revision pass X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~23^2~2819^2~78 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=66e6398505356b019edee4477b6d4f5f8cdec42d;p=emacs.git Make vc-test-svn03-working-revision pass * test/automated/vc-tests.el (vc-test--working-revision): Fix `vc-working-revision' checks to be compared against nil, which is what is should return for unregistered files. --- diff --git a/test/ChangeLog b/test/ChangeLog index f9a54b53420..e0d4eeb323a 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,9 @@ +2015-02-07 Dmitry Gutov + + * automated/vc-tests.el (vc-test--working-revision): Fix + `vc-working-revision' checks to be compared against nil, which is + what is should return for unregistered files. + 2015-02-06 Nicolas Petton * automated/seq-tests.el: New tests for seq-mapcat, seq-partition diff --git a/test/automated/vc-tests.el b/test/automated/vc-tests.el index 5b7b3cce039..e83eb85c0fe 100644 --- a/test/automated/vc-tests.el +++ b/test/automated/vc-tests.el @@ -330,18 +330,20 @@ For backends which dont support it, `vc-not-supported' is signalled." (vc-working-revision default-directory backend) '("0" "master"))) (let ((tmp-name (expand-file-name "foo" default-directory))) - ;; Check for initial state. - (should - (member (vc-working-revision tmp-name backend) '("0" "master"))) + ;; Check for initial state, should be nil until it's registered. + ;; Don't pass the backend explictly, otherwise some implementations + ;; return non-nil. + (should (null (vc-working-revision tmp-name))) - ;; Write a new file. Check for state. + ;; Write a new file. Check state. (write-region "foo" nil tmp-name nil 'nomessage) - (should - (member (vc-working-revision tmp-name backend) '("0" "master"))) + (should (null (vc-working-revision tmp-name))) ;; Register a file. Check for state. (vc-register (list backend (list (file-name-nondirectory tmp-name)))) + ;; FIXME: Don't pass the backend. Emacs should be able to + ;; figure it out. (should (member (vc-working-revision tmp-name backend) '("0" "master")))